-- GENERATED SPELL FOR [Risen Guardian] --


function spell0_11598(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11598', 18000, 1)
end

function spell1_11598(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(16583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11598', 652, 1)
end

function spell2_11598(pUnit, Event) --@Shrink,n/a--
pUnit:FullCastSpellOnTarget(7289,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11598', 3000, 1)
end

function spell3_11598(pUnit, Event) --@Veil of Shadow,Heal--
pUnit:FullCastSpellOnTarget(7068,pUnit)
pUnit:RegisterEvent('Sorts_11598', 16500, 1)
end

function spell4_11598(pUnit, Event) --@Wither Touch,n/a--
pUnit:FullCastSpellOnTarget(4974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11598', 576, 1)
end

function Sorts_11598(pUnit, Event)
local choix_sorts_11598 = math.random(0, 4)
if choix_sorts_11598 == 0 then
pUnit:RegisterEvent('spell0_11598', 1, 1)
end
if choix_sorts_11598 == 1 then
pUnit:RegisterEvent('spell1_11598', 1, 1)
end
if choix_sorts_11598 == 2 then
pUnit:RegisterEvent('spell2_11598', 1, 1)
end
if choix_sorts_11598 == 3 then
pUnit:RegisterEvent('spell3_11598', 1, 1)
end
if choix_sorts_11598 == 4 then
pUnit:RegisterEvent('spell4_11598', 1, 1)
end
end

function mob11598_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11598', math.random(1500, 3000), 1)
end

function mob11598_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11598_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11598_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11598, 1, 'mob11598_Action')
RegisterUnitEvent(11598, 2, 'mob11598_Leave')
RegisterUnitEvent(11598, 3, 'mob11598_Kill')
RegisterUnitEvent(11598, 4, 'mob11598_Die')
